home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / bn_bighop.ph < prev    next >
Encoding:
Text File  |  1994-04-25  |  4.2 KB  |  173 lines

  1.  
  2. /*****************************************************************************
  3.   FILE           : bn_bighop.ph
  4.   SHORTNAME      : bn_bighop
  5.   SNNS VERSION   : 3.2
  6.  
  7.   PURPOSE        : 
  8.   NOTES          :
  9.  
  10.   AUTHOR         : Christine Bagdi 
  11.   DATE           : 27.5.1993
  12.  
  13.   CHANGED BY     : 
  14.   IDENTIFICATION : @(#)bn_bignet.ph    1.6 3/24/93
  15.   SCCS VERSION   : 1.6
  16.   LAST CHANGE    : 5/27/93
  17.  
  18.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  19.  
  20. ******************************************************************************/
  21. #ifndef _BN_BIGHOP_DEFINED_
  22. #define  _BN_BIGHOP_DEFINED_
  23.  
  24.  
  25.  
  26. /* begin global definition section */
  27.  
  28. void bn_createBigHop (void);
  29.  
  30. /* end global definition section */
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. /* begin private definition section */
  38.  
  39. #define BN_RIGHT  0
  40. #define BN_BELOW  1
  41. #define BN_LEFT   2
  42.  
  43. #define BN_INPUT 0
  44. #define BN_OUTPUT 1
  45. #define BN_HIDDEN 2
  46. #define BN_DUAL 3
  47.  
  48. #define SOURCE_PLANE 1
  49. #define SOURCE_CLUSTER 3
  50. #define SOURCE_UNIT 5
  51.  
  52. #define TARGET_PLANE 8
  53. #define TARGET_CLUSTER 17
  54. #define TARGET_UNIT 33
  55.  
  56. #define PLANE_TO_PLANE 9
  57. #define PLANE_TO_CLUSTER 26
  58. #define PLANE_TO_UNIT 42
  59. #define CLUSTER_TO_PLANE 12
  60. #define CLUSTER_TO_CLUSTER 29
  61. #define CLUSTER_TO_UNIT 45
  62. #define UNIT_TO_PLANE 14
  63. #define UNIT_TO_CLUSTER 31
  64. #define UNIT_TO_UNIT 47
  65.  
  66. #define bn_widget_output(string) ((strcmp("0",string)==0) ? ("") : (string))
  67.  
  68. #define UI_GENERAL 0
  69.  
  70.  
  71. static int BN_ERROR=0;
  72.  
  73. typedef struct plane {
  74.   int width;
  75.   int height;
  76.   int pos;
  77.   int type;
  78.   int begin;
  79.   struct plane *next;
  80.   struct plane *before;
  81. } PLANE;
  82.  
  83. static char *plane_pos[] = {"right","below","left"};
  84. static char *plane_type[] = {"input","output","hidden","dual"};
  85.  
  86. static PLANE *PLANE_current_element = NULL;
  87. static PLANE *PLANE_first_element = NULL;
  88. static PLANE *PLANE_last_element = NULL;
  89.  
  90. static int   PLANE_length = 0;
  91. static int   PLANE_no = 0;
  92. static int   PLANE_pos = BN_RIGHT;
  93. static int   PLANE_type = BN_DUAL;
  94.  
  95. static int PLANE_width,PLANE_height;
  96.  
  97.  
  98. #define bn_fontWidth 8
  99.  
  100. static int bighop_widget_open = 0;
  101.  
  102. static int bn_intWidth = 6 * bn_fontWidth;
  103.  
  104.  
  105. static Widget baseWidget;
  106. static Widget z1s1,z1s2,z1s3,z2s1,z3s1,z4s1,z5s1,z6s1,z7s1;
  107.  
  108. static Widget z2s2,z2s3,z3s2,z3s3,z4s2,z4s3,
  109.        z5s2,z5s3,z6s2,z6s3,z7s2,z7s3;
  110.  
  111.  
  112. static Widget z8s2,z8s3,z9s1,z9s2,z9s3,z9s4,z10s1,z11s1,z12s1,z13s1,z14s1,z15s1,z16s1,z17s1;
  113. static Widget z18s1,z19s1,z20s1,z21s1,z22s1,z23s1;
  114.  
  115. static Widget z10s2,z10s3,z10s4,z10s5,z13s2,z13s3,z13s4,z13s5,z14s2,z14s3,z14s4,z14s5;
  116. static Widget z15s2,z15s3,z15s4,z15s5,z16s2,z16s3,z16s4,z16s5,z17s2,z17s3,z17s4,z17s5;
  117. static Widget z18s2,z18s3,z18s4,z18s5,z19s2,z19s3,z19s4,z19s5,z20s2,z20s3,z20s4,z20s5;
  118. static Widget z22s2,z22s3,z22s4,z22s5,z23s2,z23s3,z23s4,z23s5;
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. /* bn_bignet */
  126. static void bn_createPlanePannel (Widget parent);
  127. static void exit_hop_PROC (void);
  128.  
  129. /* bn_create_net */
  130. static void create_net_PROC(void);
  131. static void calculate_first_snns_unit_no_of_plane(void);
  132. static int calculate_x_begin(int *new_x_begin,int *old_x_begin,int *x_max,int width,int pos);
  133. static int calculate_y_begin(int *absolute_y_max,int *relative_y_max,int *y_offset,int height,int pos);
  134. static void create_snns_unit(void);
  135. static void bn_display_net(void);
  136.  
  137. static void make_links(void);
  138.  
  139. /* bn_plane */
  140.  
  141. static int read_plane_elements(void);
  142. static void write_current_plane(void);
  143. static void clear_current_plane(void);
  144. static void write_current_plane_to_editor(void);
  145. static void clear_edit_plane(void);
  146. static void cancel_net_PROC(void);
  147. static void enter_plane_PROC(void);
  148. static void insert_plane_PROC(void);
  149. static void overwrite_plane_PROC(void);
  150. static void delete_plane_PROC(void);
  151. static void forward_plane_PROC(void);
  152. static void backward_plane_PROC(void);
  153. static void end_plane_PROC(void);
  154. static void beginning_plane_PROC(void);
  155. static void pos_PROC(void);
  156. static void current_plane_to_editor_PROC(void);
  157. static void type_PROC(void);
  158. static void enter_plane(void);
  159. static void insert_plane(void);
  160. static void overwrite_plane(void);
  161. static void delete_current_plane(void);
  162. static int forward_plane(void);
  163. static int backward_plane(void);
  164. static int beginning_plane(void);
  165. static int end_plane(void);
  166. static PLANE *get_plane(int plane_no);
  167.  
  168. /* end private definition section */
  169.  
  170. #endif 
  171. /* end of file */
  172. /* lines: 255 */
  173.